/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    height: 100vh;
    overflow-x: hidden;
    color: #fff;
}

/* 页面过渡效果 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff6b81;
    z-index: 1000;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.7s ease-in-out;
}

/* 导航菜单 */
.main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 10px 20px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 首页样式 */
.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 0 20px;
}

.welcome-text {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.8;
}

.start-button {
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

#startJourney {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: linear-gradient(45deg, #ff6b81, #ff8e53);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#startJourney:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 回忆页样式 */
.memories-container {
    max-width: 900px;
    margin: 100px auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-date {
    position: absolute;
    left: -50px;
    width: 100px;
    padding: 5px 10px;
    background: #ff6b81;
    border-radius: 20px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    margin-top: 0;
    color: #fff;
}

.timeline-photos {
    display: flex;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.timeline-photos img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.timeline-photos img:hover {
    transform: scale(1.05);
}

/* 表白页样式 */
.content {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 20px;
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards;
    position: relative;
    z-index: 10;
}

/* 漂浮心形动画 */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23ff6b81" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center center;
    background-size: contain;
    opacity: 0.6;
    animation: float 15s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-20vh) scale(1.2);
        opacity: 0;
    }
}

/* 打字机效果 */
.message p {
    overflow: hidden;
    white-space: nowrap;
    margin: 10px auto;
    opacity: 0;
    animation: typing 3s steps(40, end) forwards;
}

.message p:nth-child(1) { animation-delay: 0.5s; }
.message p:nth-child(2) { animation-delay: 1.5s; }
.message p:nth-child(3) { animation-delay: 2.5s; }
.message p:nth-child(4) { animation-delay: 3.5s; }

@keyframes typing {
    from { width: 0; opacity: 0; }
    to { width: 100%; opacity: 1; }
}

/* 按钮波纹效果 */
.choice-btn {
    position: relative;
    overflow: hidden;
}

.choice-btn:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.choice-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 其他原有样式保持不变... */

/* 新增互动选择样式 */
.interactive-choices {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.choice-btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn[data-response="yes"] {
    background: linear-gradient(45deg, #4CAF50, #8BC34A);
    color: white;
}

.choice-btn[data-response="no"] {
    background: linear-gradient(45deg, #f44336, #FF9800);
    color: white;
}

.choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 模态框样式 */
.response-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 80%;
    position: relative;
}

.modal-content h2 {
    color: #ff6b81;
    margin-top: 0;
}

.modal-content p {
    color: #555;
    margin-bottom: 25px;
}

#closeModal {
    padding: 10px 25px;
    background: #ff6b81;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 画廊模态框样式 */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    background: rgba(0,0,0,0.7);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* 相册导航 */
.album-nav {
    margin-bottom: 20px;
}

.album-thumbnails {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.album-thumb {
    width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.album-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.album-thumb span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #fff;
}

.album-thumb.active img {
    border-color: #ff6b81;
    transform: scale(1.1);
}

.album-thumb:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

/* 照片查看区 */
.gallery-viewer {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slide {
    display: none;
    width: 100%;
    height: 100%;
    text-align: center;
}

.gallery-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 0 0 8px 8px;
}

/* 相册标题 */
.album-title {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* 导航按钮 */
.prev, .next {
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s;
    cursor: pointer;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border-radius: 0 3px 3px 0;
}

.next {
    right: 0;
    border-radius: 3px -1 0 3px;
}
.prev{
    left: 0;
    border-radius: 3px -1 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(255,107,129,0.8);
}

/* 音乐控制 */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

#musicToggle {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#musicToggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 动画定义 */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* 其他原有动画保持不变... */

/* 响应式设计 */
@media (max-width: 768px) {
    .main-nav {
        top: 10px;
        padding: 8px 15px;
    }
    
    .nav-link {
        margin: 0 5px;
        padding: 5px 10px;
        font-size: 0.9rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .interactive-choices {
        flex-direction: column;
        gap: 10px;
    }
    
    .choice-btn {
        width: 100%;
    }
}

/* 恐龙跳一跳游戏 */
.game-container {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.game-area {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 8px;
}

.dino {
    position: absolute;
    bottom: 0;
    left: 50px;
    width: 50px;
    height: 50px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%234CAF50" d="M30,70 Q50,40 70,70 L70,90 L30,90 Z"/><circle cx="40" cy="60" r="5" fill="%23333333"/><circle cx="60" cy="60" r="5" fill="%23333333"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.1s;
}

.obstacle {
    position: absolute;
    bottom: 0;
    right: -20px;
    width: 20px;
    height: 40px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 40"><rect width="20" height="40" fill="%23F44336"/></svg>') no-repeat center;
    background-size: contain;
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

#startGame {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#startGame:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.score {
    color: white;
    font-size: 1.2em;
}

/* 游戏响应式设计 */
@media (max-width: 600px) {
    .game-area {
        height: 150px;
    }
    
    .dino {
        width: 40px;
        height: 40px;
        left: 30px;
    }
    
    .obstacle {
        width: 15px;
        height: 30px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 10px;
    }
}